﻿<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<span class="pro-det-name">${model.name}</span>
<span class="pro-det-message">${model.message}</span>

<div class="pro-det-price">
	<span class="label">促销价</span><span class="yuan">¥</span>
	<span class="label-price">${model.price}</span><span class="f14 fb B2 pl10">${model.showPifaPrice}</span><br> 
	<span class="label">市场价</span>
	<span class="markt-price">¥&nbsp;<del>${model.marketPrice}</del> </span>
</div>
<div class="pro-det-panel">
	<div class="panel-cont">
		<span class="label">销量</span><span class="label-cont">${model.sellNum}</span>
	</div>
	<div class="panel-cont">
		<span class="label">评论</span><span class="label-cont">${model.commentNum}</span>
	</div>
	<div class="panel-cont">
		<span class="label">赠送积分</span><span class="label-cont"
			style="color: #280;">${model.scores}</span>
	</div>
</div>
<div class="pro-det-attrs p5 mt10">
<form id="form_buy" method="post">
<input type="hidden" id="p_id" name="p_id" value="${model.id}">
	<table>
		<s:iterator value="model.attrMaps.keySet()" id="key">
			<tr>
				<td valign="top"><span class="label fl" title="${key}">${key}</span>
				</td>
				<td class="select-radio ">
					<s:iterator value="model.attrMaps.get(#key)">
						<a href="javascript:void(0);" onclick="selectRadio('${pcode}','${code}','c_${code}')" id="${code}" class="${pcode} fl">${name}</a>
						<input type="radio" class="ndis" name="${pcode}" id="c_${code}" value="${code}"/>
					</s:iterator>
				</td>
			</tr>
			<!--<tr><td colspan="2"><div style="height:5px;" ></div></td></tr>-->
		</s:iterator>
		<tr>
			<td><span class="label fl dis-in-tab">数量</span>
			</td>
			<td>
				<div class="pro-det-num fl">
					<div class="fl">
						<a href="javascript:void(0);" onclick="min('p_num')"> <i
							class="iconfont">&#xe60e;</i> </a>
					</div>
					<div class="tb-text fl">
						<input id="p_num" name="p_num" type="text"
							onblur="checkNumber('p_num',${model.remainder})" value="1"
							maxlength="8">
					</div>
					<div class="fl">
						<a href="javascript:void(0)"
							onclick="add('p_num',${model.remainder})"> <i
							class="iconfont">&#xe604;</i> </a>
					</div>
				</div> <span class="remainder fl">&nbsp;&nbsp;&nbsp;&nbsp;库存${model.remainder}件</span>
			</td>
		</tr>
		<tr>
			<td></td>
			<td>
				<s:if test="model.flag>0&&model.remainder>0">
					<div class="cart-button fl mt15 mr10" onclick="addToCart(event)">
						<i class="iconfont"></i>&nbsp;加入购物车
					</div>
					<div class="cart-button fl mt15 buy-now" onclick="addToCart(event,'&p_buyNow=YES')">立即购买</div>
				</s:if>
				<s:else>
					<div class="cart-button fl mt15 buy-now">该商品暂不能购买</div>
				</s:else>
			</td>
		</tr>
	</table>
</form>
</div>